home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 18 / CU Amiga Magazine's Super CD-ROM 18 (1997)(EMAP Images)(GB)[!][issue 1998-01].iso / CUCD / Online / CNetDemo / cnet / sdk / include / fifo.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-09-04  |  1.3 KB  |  49 lines

  1.  
  2. /*
  3.  *  FIFO.H
  4.  *
  5.  *  PUBLIC FIFO STRUCTURES AND DEFINES
  6.  */
  7.  
  8. #ifndef LIBRARIES_FIFO_H
  9. #define LIBRARIES_FIFO_H
  10.  
  11. #define FIFONAME    "fifo.library"
  12.  
  13. #define FIFOF_READ        0x00000100L        //  intend to read from fifo
  14. #define FIFOF_WRITE        0x00000200L        //  intend to write to fifo
  15. #define FIFOF_RESERVED    0xFFFF0000L        //  reserved for internal use
  16. #define FIFOF_NORMAL        0x00000400L        //  request blocking/sig support
  17. #define FIFOF_NBIO        0x00000800L        //  non-blocking IO
  18.  
  19. #define FIFOF_KEEPIFD    0x00002000L        //  keep fifo alive if data pending
  20. #define FIFOF_EOF            0x00004000L        //  EOF on close
  21. #define FIFOF_RREQUIRED    0x00008000L        //  reader required to exist
  22.  
  23. #define FREQ_RPEND    1
  24. #define FREQ_WAVAIL    2
  25. #define FREQ_ABORT    3
  26.  
  27. typedef void *FifoHan;                        //  returned by OpenFifo()
  28.  
  29. #ifndef IN_LIBRARY
  30.  
  31. FifoHan OpenFifo(char *, long, long);
  32. void CloseFifo(FifoHan, long);
  33. long ReadFifo(FifoHan, char **, long);
  34. long WriteFifo(FifoHan, char *, long);
  35. void RequestFifo(FifoHan, struct Message *, long);
  36. long BufSizeFifo(FifoHan);
  37.  
  38. #pragma libcall FifoBase OpenFifo 1e 81003
  39. #pragma libcall FifoBase CloseFifo 24 1002
  40. #pragma libcall FifoBase ReadFifo 2a 81003
  41. #pragma libcall FifoBase WriteFifo 30 81003
  42. #pragma libcall FifoBase RequestFifo 36 81003
  43. #pragma libcall FifoBase BufSizeFifo 3c 1
  44.  
  45. #endif
  46.  
  47. #endif
  48.  
  49.